package bb.lanxing.lib.devices.ble.switchablecadence;

import android.os.RemoteException;
import bb.lanxing.lib.devices.base.DeviceContext;
import bb.lanxing.lib.devices.ble.cadence.IRemoteSwitchableCadenceController;
import bb.lanxing.lib.devices.utils.DeviceManagerHelper;

public class RemoteSwitchableCadenceControllerImpl extends IRemoteSwitchableCadenceController.Stub {
    private SwitchableCadenceController controller;

    public RemoteSwitchableCadenceControllerImpl(String str) {
        if (DeviceContext.getDeviceManager() != null) {
            this.controller = DeviceManagerHelper.getSwitchableCadenceController();
        }
    }

    @Override
    public boolean switchTo(int i) throws RemoteException {
        SwitchableCadenceController switchableCadenceController = this.controller;
        if (switchableCadenceController != null) {
            return switchableCadenceController.switchTo(i);
        }
        return false;
    }
}
